<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=688499767942751";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="col-md-8 ">
	<div class="breadcrumbs">
		<div class="item"><a href="<?php echo base_url();?>" title="Home">Home</a> > </div>
		<div class="item"><a href="" title=""> <?php echo $title; ?> </a> </div>
	</div>

	<div class="big-title">
		<h1><?php echo $title;?></h1>	
	</div>
	
	<div class="embed-responsive embed-responsive-16by9">
		<video  controls>
		  <source src="<?php echo $result_get_ep['url'];?>" type="video/mp4">
		</video>
	</div>
	
	<div id="watch-content" class="epcontent">
		<h2><?php echo $title;?></h2>
		<h3>Ban đang xem <?php echo $description; ?></h3>
		<div class="controls">
			<div class="button-icon pull-left">
				<?php if(is_login() == TRUE){ ?>
					<button type="button" id="add-film" onclick="addcontrols('add-film')"><i class="fa fa-plus"></i> Add film</button>
					<button type="button" id="zoom"><i class="fa fa-arrows-h"></i>Zoom</button>
					<button type="button" id="like-film" onclick="addcontrols('like-film')"><i class="fa fa-heart"></i> Like</button>
					<button type="button" id="error-film" onclick="addcontrols('error-film')"><i class="fa fa-warning"></i> Error</button>
				<?php }else{ ?>
					<button type="button" data-toggle="modal" data-target="#myModal-2"><i class="fa fa-plus"></i> Add film</button>
					<button  id="zoom" type="button"><i class="fa fa-arrows-h"></i>Zoom</button>
					<button type="button" data-toggle="modal" data-target="#myModal-2"><i class="fa fa-heart"></i> Like</button>
					<button type="button" data-toggle="modal" data-target="#myModal-2"><i class="fa fa-warning"></i> Error</button>
				<?php }?>
			</div>
			<div class="like pull-left">
				<div class="share-like"><div class="fb-like" style="max-width:250px" data-href="<?php echo $curent?>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div></div>
			</div>
		</div>
	</div>
	
	<div role="test" >
		 <!-- Nav tabs -->
		<ul class="nav nav-tabs" role="tablist">
		 	<li role="presentation" class="active"><a href="#episode" aria-controls="episode" role="tab" data-toggle="tab"></i> EPISODE</a></li> 
		</ul>
		
		<div class="tab-content">
			<div role="test" class="tab-pane active" id="episode">
				<div id="carousel-id-2" class="carousel slide" data-ride="carousel" data-interval="false">
				    <div class="carousel-inner">
				    <?php if(!empty($result_ep)){ ?>
				        <div class="item active">
				        	<ul>
				        	<?php $k = 0;?>
				        	<?php foreach($result_ep as $key => $value){ $k++;?>
				        		<li><a href="<?php echo base_url('watch').'/'.$result['rewrite'].'-ep-'.$value['epname'].'-'.$value['epid'].'.html';?>"   <?php if($value['epid'] == $active){ echo 'class="avtive-ep"';}?> title="<?php echo $result['name'];?> <?php echo $value['epname'];?>"><?php echo $value['epname'];?></a></li>
								<?php  if($k%50 == 0){ ?>
									</ul>
									</div>
									<div class="item">
									<ul>
								<?php } ?>
				        	<?php } ?>
				        	</ul>
						</div>
					<?php }?>
				    </div>
				    <a class="left carousel-control" href="#carousel-id-2" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
				    <a class="right carousel-control" href="#carousel-id-2" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
				</div>
			</div>
		</div>
	</div>
	<div class="fb-comments" data-href="<?php if(!empty($curent)){ echo $curent;}?>" data-width="750" data-numposts="10" data-colorscheme="light"></div>	
</div>